package anims.XXgt.anim;

import java.awt.Color;
import java.awt.Graphics;

public class BackGround implements IDrawObject {
	int minX, maxX, minY, maxY; // Box's bounds (package access)
	private Color colorFilled; // Box's filled color (background)
	private Color colorBorder; // Box's border color
	private static final Color DEFAULT_COLOR_FILLED = Color.BLACK;
	private static final Color DEFAULT_COLOR_BORDER = Color.YELLOW;

	/** Constructors */
	public BackGround(int x, int y, int width, int height, Color colorFilled, Color colorBorder) {
		minX = x;
		minY = y;
		maxX = x + width - 1;
		maxY = y + height - 1;
		this.colorFilled = colorFilled;
		this.colorBorder = colorBorder;
	}

	/** Constructor with the default color */
	public BackGround(int x, int y, int width, int height) {
		this(x, y, width, height, DEFAULT_COLOR_FILLED, DEFAULT_COLOR_BORDER);
	}

	/** Set or reset the boundaries of the box. */
	public void set(int x, int y, int width, int height) {
		minX = x;
		minY = y;
		maxX = x + width - 1;
		maxY = y + height - 1;
	}

	/** Draw itself using the given graphic context. */
	@Override
	public void draw(Graphics g) {
		g.setColor(colorFilled);
		g.fillRect(minX, minY, maxX - minX - 1, maxY - minY - 1);
		g.setColor(colorBorder);
		g.drawRect(minX, minY, maxX - minX - 1, maxY - minY - 1);
	}

	@Override
	public String toStringStatus() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void translate(int x, int y) {
		// TODO Auto-generated method stub

	}

	@Override
	public void rotate(int unitAngle) {
		// TODO Auto-generated method stub

	}

	@Override
	public Color getFillColor() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Color getLineColor() {
		// TODO Auto-generated method stub
		return null;
	}
}